<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./cmmTemplate.xhtml">

            <ui:define name="top">
                top
            </ui:define>

            <ui:define name="left">
                left
            </ui:define>

            <ui:define name="right">
                right
            </ui:define>

            <ui:define name="content">
                <h2>File Upload</h2>
                <h:form enctype="multipart/form-data">
                    <p:growl id="messages" showSummary="true" showDetail="true" /> 
                    <p:fileUpload fileUploadListener="#{jSFController.handleFileUpload}"
                                  mode="advanced"   
                                  update="messages"  
                                  sizeLimit="1000000"   
                                  allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/>  
                    <hr/>
                    <!--h:graphicImage value="{jSFController.filePath}" id="uploadedFile"></h:graphicImage-->
                </h:form>
            </ui:define>

            <ui:define name="bottom">
                bottom
            </ui:define>

        </ui:composition>

    </body>
</html>
